package org.springblogs.batch.quartz.stock;

import org.springblogs.batch.config.stock.StockPriceBatchJob;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Component
public class StockPriceTask extends AbstractScheduledTask<StockPriceBatchJob> {

	@Autowired
	private StockPriceBatchJob Job;

	/**
	 * 每天2点执行 
	 */
	@Scheduled(cron="0 0 2 * * ? *")
	//@Scheduled(fixedRate = 1000000000)
	@Override
	public void taskScheduled() {
		log.debug("StockPriceTask taskScheduled");
		execute();
	}

	@Override
	public StockPriceBatchJob getJob() {
		return Job;
	}

}